#ifndef XMLPARSER_H
#define XMLPARSER_H


#include <QFile>
#include <QtXml/QDomDocument>
#include <QHash>
#include <QVector>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <QGLWidget>
class Building;
#include <building.h>

class XMLParser:public QGLWidget
{

public:
    XMLParser(Building *b);
    void parse();

private :


    QHash<QString ,QVector<float> > points;
    void setVariables(QDomNode node);
    void setProperties(QDomNode node);
    GLuint makeObject(QDomElement node);
    GLuint makeObjects(QDomNode node);
    GLuint drawPolygon(QDomElement e);
    GLfloat* getPoint(QDomElement e);
    Building* building;
    GLuint object;
};

#endif // XMLPARSER_H
